package com.mutou.web.util;

import java.util.Collection;
import java.util.List;

import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.github.miemiedev.mybatis.paginator.domain.Paginator;

public class DataPageList<T> extends PageList<T>{

		/**
	 * 
	 */
	private static final long serialVersionUID = -4495948483828176774L;
		private Paginator paginator;
	    private List<T> aaData; 			//aaData 与datatales 加载的“dataSrc"对应  
	    @SuppressWarnings("unused")
		private int iTotalDisplayRecords; 	//总记录数
	    @SuppressWarnings("unused")
		private int iTotalRecords;   		//全部记录
	    private int sEcho;
	    public DataPageList() {  
	          
	    }  
	//get set方法 此处省略  
		public List<T> getAaData() {
			return aaData;
		}
		public void setAaData(List<T> aaData) {
			this.aaData = aaData;
		}
		public int getiTotalDisplayRecords() {
			return getPaginator().getLimit();
		}
		public int getiTotalRecords() {
			return getPaginator().getTotalCount();
		}
		public Paginator getPaginator() {
			return paginator;
		}
	  
		public int getsEcho() {
			return sEcho;
		}
		public void setsEcho(int sEcho) {
			this.sEcho = sEcho;
		}
		public DataPageList(Collection<? extends T> c){
			super(c);
		}
		public DataPageList(Collection<? extends T> c,Paginator paginator){
			super(c);
			this.paginator = paginator;
		}
		public DataPageList(Paginator paginator){
			this.paginator = paginator;
		}
}
